/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package UserBeans;

import Action.EventSessionBeanLocal;
import Entity.Category;
import Entity.Event;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Minh Duong
 */
@ManagedBean(name = "UsereventBean")
@RequestScoped
public class UserEventBean implements Serializable {

    @EJB
    private EventSessionBeanLocal eventSessionBean;

    /** Creates a new instance of UserEventBean */
    public UserEventBean() {
        event=new Event();
        selectev=new Event();
    }
    private Event event;
    private Event selectev;

   

    public List<Event> listByCat(String catName) {
        return eventSessionBean.listbyCat(catName);
    }

    public List<Event> listAvailableEvent() {
        return eventSessionBean.listAvailableEvent();
    }

    public List<Event> listNextEvent() {
        return eventSessionBean.listNextEvent();
    }

    /**
     * @return the selectev
     */
    public Event getSelectev() {
        return selectev;
    }

    /**
     * @param selectev the selectev to set
     */
    public void setSelectev(Event selectev) {
        this.selectev = selectev;
    }

    /**
     * @return the event
     */
    public Event getEvent() {
        return event;
    }

    /**
     * @param event the event to set
     */
    public void setEvent(Event event) {
        this.event = event;
    }
}
